[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
getarccoords() Get Last Arc Coordinates
#include <graphics.h>
void far getarccoords(arccoords);
struct arccoordstype far *arccoords;
getarccoords() gets information about the last call to arc(). It
stores it in a structure of type 'arccoordstype' which is pointed to
by 'arccoords'. The 'arccoordstype' structure is defined in
<graphics.h> :
struct arccoordstype {
int x, y;
int xstart, ystart, xend, yend;
};
('x','y') specifies the center point of the arc. ('xstart','ystart')
specifies the starting position, and ('xend','yend') specifies the
ending position of the arc.
Returns: Nothing.
-------------------------------- Example ---------------------------------
The following statements draw a half circle.
#include <graphics.h>
main()
{
int gdriver = DETECT;
int gmode;
struct arccoordstype arcinfo;
initgraph(&gdriver,&gmode,"");
arc(320,150,0,179,50);
getarccoords(&arcinfo);
line(arcinfo.xstart,arcinfo.ystart,arcinfo.xend,arcinfo.yend);
getch();
closegraph();
}
See Also:
arc()
circle()
ellipse()
getaspectratio()
pieslice()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson